import { Controller, Get, Query, UseGuards } from '@nestjs/common';
import { MicrosoftBearerGuard } from 'src/auth/microsoft-bearer.guard';
import { OrgService } from './org.service';

@Controller('org')
export class OrgController {
  constructor(private readonly orgService: OrgService) {}

  @Get('getAll')
  @UseGuards(MicrosoftBearerGuard)
  async getAll(@Query() query: { orgUUID: string | null }) {
    return await this.orgService.getAll(query.orgUUID);
  }
}
